<template>
    <view>
       <!-- <view class="banner">
            <image class="banner-img" :src="banner.cover"></image>
            <view class="banner-title">{{banner.title}}</view>
        </view> -->
        <view class="article-meta">
            <text class="article-author">{{superiorInfo.info}}</text>
            <text class="article-text">{{dataInfo.name}}--发表于</text>
            <text class="article-time">{{superiorInfo.time}}</text>
        </view>
        <view class="article-content">
            <rich-text :nodes="htmlString"></rich-text>
        </view>
        <!-- #ifdef MP-WEIXIN -->
        <ad v-if="htmlString" unit-id="adunit-01b7a010bf53d74e"></ad>
        <!-- #endif -->
    </view>
</template>

<script>
	let _this;
    export default {
        data() {
            return {
                title: 'list-triplex-row',
                htmlString: "",
				superiorInfo:{
					id:"",
					title:""
				},
				dataInfo:{}
            }
        },
        onShareAppMessage() {
           /* return {
                title: this.banner.title,
                path: '/pages/template/list2detail-detail/list2detail-detail?detailDate=' + JSON.stringify(this.banner)
            } */
        },
        onLoad(event) {
			_this=this;
         
			 this.superiorInfo=JSON.parse(event.obj)
			  console.log(this.superiorInfo)
              this.getDetail();
				uni.setNavigationBarTitle({
					title: this.superiorInfo.name
				});
        },
        methods: {
            getDetail() {
				const value = uni.getStorageSync("JSESSIONID");
				const val = uni.getStorageSync("pathHost");
                uni.request({
                    // url: 'https://unidemo.dcloud.net.cn/api/news/36kr/5310813' ,
					url: val+"/ggcapp/oa/oaNotify/myOaNotifyInfo"+";JSESSIONID="+value+"?__ajax=true&mobileLogin=true&id="+this.superiorInfo.id,
                    success: (data) => {
                         console.log(data);
						 _this.dataInfo=data.data.myOaNotifyInfo;
						 _this.htmlString=data.data.myOaNotifyInfo.content
                    },
                    fail: () => {
                        console.log('fail');
                    }
                })
            }
        }
    }
</script>

<style>
	page{
		background-color: white;
	}
    view {
        font-size: 28upx;
        line-height: 1.8;
    }

    .banner {
        height: 360upx;
        overflow: hidden;
        position: relative;
        background-color: #ccc;
    }

    .banner-img {
        width: 100%;
    }

    .banner-title {
        max-height: 84upx;
        overflow: hidden;
        position: absolute;
        left: 30upx;
        bottom: 30upx;
        width: 90%;
        font-size: 32upx;
        font-weight: 400;
        line-height: 42upx;
        color: white;
        z-index: 11;
    }

    .article-meta {
        padding: 20upx 40upx;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        color: gray;
    }

    .article-text {
        font-size: 26upx;
        line-height: 50upx;
        margin: 0 20upx;
    }

    .article-author,
    .article-time {
        font-size: 30upx;
    }

    .article-content {
        padding: 0 30upx;
        overflow: hidden;
        font-size: 30upx;
        margin-bottom: 30upx;
    }
</style>
